/*
 * Resource Manager Window
 */

MyDesktop.ResourcesWindow = Ext.extend(Ext.app.Module, {
    id:'resourceManager',
    init : function(){
        this.launcher = {
            text: 'Resource Manager',
            iconCls:'tabs',
            handler : this.createWindow,
            scope: this
        }
		ResourcesWindow = this;
    },

    createWindow : function(){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('resourceManager');
        if(!win){
            win = desktop.createWindow({
                id: 'resourceManager',
                title:'Resource Manager',
                width:740,
                height:480,
                iconCls: 'tabs',
                shim:false,
                animCollapse:false,
                border:false,
                constrainHeader:true,

                layout: 'fit',
                items:
                    new Ext.TabPanel({
                        activeTab:0,

                        items: [{
                            title: 'View Resources',
                            header:false,
                            border:false,
							autoScroll: true,
							autoLoad: {url:"resources1.html", scripts:true}
                        },{
                            title: 'Search Resources',
                            header:false,
                            border:false,
							autoScroll: true,
							autoLoad: {url:"resources2.html", scripts:true}
                        },{
                            title: 'Bad Links',
                            header:false,
                            border:false,
							autoScroll: true,
							autoLoad: {url:"resources3.html", scripts:true}
                        }]
                    })
            });
        }
        win.show();
    },
	closeWindow : function() {
		var desktop = this.app.getDesktop();
        var win = desktop.getWindow('resourceManager');
		if (win) {
			win.close();
		}	
	}
});